package com.itheima.test2;

public class Test {

    public static void main(String[] args) {
        Zi zi = new Zi();
       // zi.show();
        zi.useSing();

    }


}

class Zi extends Fu {
    int i=20;

    public void show() {
        int i = 10;
        System.out.println("父类的i"+super.i);
        System.out.println("本类的i"+this.i);
        System.out.println("方法的i"+i);
    }

    public void useSing(){
        sing();//调用本类的方法
       // super.sing();//调用父类的方法
    }
    @Override
    public void sing(){
        System.out.println("儿子喜欢唱基尼太美");
    }

    public static void jump(){

    }


}

class Fu extends Ye {

    public static void jump() {
        System.out.println("爸爸喜欢跳舞");
    }
    public void sing() {
        System.out.println("爸爸喜欢唱纤夫的爱");
    }
}

class Ye {
    int i=40;
    public void sing() {
        System.out.println("爷爷喜欢唱歌精忠报国");
    }


}